home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / BUSINESS / XLMATH22.ZIP / SOURCE.ZIP / MAKEFILE next >
Text File  |  1993-08-28  |  3KB  |  100 lines

  1. #------------------------------------------------------------------------
  2. # Makefile : Builds XLQC.XLL
  3. #------------------------------------------------------------------------
  4. #
  5. # Usage:    NMAKE                    (build application)
  6. #       :    NMAKE DEBUG[0|1]        (build debug version)
  7. #       :    NMAKE SMART[0|1]         (build application using SMRTHEAP.DLL
  8. #       :    NMAKE clean                (erase compiled files)
  9. #
  10. # Note:        The files xlauto.c, xlutil.c xlutil.h are in the subdirectory
  11. #            \xll. All other files are in the subdirectory
  12. #            \xll\xlqc. The modules xlauto and xlutil contain general 
  13. #            useful in building other XLL's and are thus kept separate from
  14. #            the xlqc specific functions.
  15. #
  16. NAME    = XLMATH
  17. CFLAGS    = -ALw -GD -G2s -Zp -W3 /D_$(NAME)
  18. LINKFLAGS    = /NOD
  19. #
  20. #    Object modules to .\OBJ
  21. #    secondary source in \SRC\XLL
  22. #
  23. DIR        = OBJ
  24. XDIR    = \SRC\XLL
  25. INCLUDE    = .\;D:\MSVC\INCLUDE;D:\WINDEV\INCLUDE;D:\CPALETTE\INCLUDE;$(XDIR);
  26.  
  27. ##### Library Macros #####
  28. LIBS        = 
  29. !if "$(DEBUG)"=="1"
  30. CFLAGS        = /DDEBUG $(CFLAGS) -Zid -Od /Fo$*.OBJ
  31. LINKFLAGS    =$(LINKFLAGS)  /CO /LI /MAP
  32. LIBS        = libw ldllcew xlcall lxlfrmd $(LIBS)
  33. !else
  34. CFLAGS        = $(CFLAGS) /Os /Fo$*.OBJ
  35. LINKFLAGS    = $(LINKFLAGS)
  36. LIBS        = libw ldllcew xlcall lxlfrm $(LIBS)
  37. !endif
  38. ##### SMARTHEAP flag defined ####
  39. !if "$(SMART)"=="1"
  40. $(CFLAGS)    = $(CFLAGS) /D_USE_SMARTHEAP
  41. LIBS        = $(LIBS) smrtheap
  42. !endif
  43.  
  44. ##### Inference Rules #####
  45. {.}.c{$(DIR)}.obj:                            # c files here
  46.     $(CC) /c $(CFLAGS) $<
  47.  
  48. {$(XDIR)}.c{$(DIR)}.obj:
  49.     $(CC) /c $(CFLAGS) $<
  50.  
  51. {.}.rc{$(DIR)}.res:
  52.     $(RC) $(RFLAGS) -r /fo $@ $<
  53.  
  54. $(NAME).xll:    $(DIR)\$(NAME).xll
  55.     copy $** $@
  56.  
  57. ##### Dependents For Goal and Command Line #####
  58. $(DIR)\$(NAME).xll: $(DIR)\$(NAME).obj                \
  59.     $(DIR)\xlminit.obj $(DIR)\xlmdlg.obj $(DIR)\xlmcfit.obj    \
  60.     $(DIR)\xlcurve.obj $(DIR)\xldiag.obj            \
  61.     $(DIR)\xlauto.obj $(DIR)\xlutil.obj             \
  62.     $(NAME).def $(DIR)\$(NAME).res 
  63.     link $(LINKFLAGS) @<<
  64. $(DIR)\$(NAME) $(DIR)\xlminit $(DIR)\xlmdlg $(DIR)\xlmcfit +
  65. $(DIR)\xlauto $(DIR)\xlutil $(DIR)\xlcurve $(DIR)\xldiag,
  66.     $(DIR)\$(NAME).xll,
  67.     $(NAME).map,
  68.     $(LIBS),
  69.     $(NAME).def
  70. <<
  71.     rc -p -t $(DIR)\$(NAME).res $(DIR)\$(NAME).xll
  72. !if "$(DEBUG)"=="1"
  73.     cvpack -p $(NAME).xll
  74. !endif
  75.  
  76. $(DIR):
  77.     @IF NOT EXIST $(DIR)\*.* MD $(DIR)
  78.  
  79. ##### Dependents #####
  80. $(DIR)\$(NAME).res:        $(NAME).rc $(NAME).h 
  81. $(DIR)\xlminit.obj:        $(NAME).h $(XDIR)\xlutil.h
  82. $(DIR)\xlmdlg.obj:        $(NAME).h $(XDIR)\xlutil.h
  83. $(DIR)\xlmcfit.obj:        $(NAME).h $(XDIR)\xlutil.h xlmcfit.h
  84. $(DIR)\xlauto.obj:        $(NAME).h $(XDIR)\xlutil.h
  85. $(DIR)\xlutil.obj:        $(NAME).h $(XDIR)\xlutil.h
  86. $(DIR)\xlcurve.obj:        $(NAME).h $(XDIR)\xlutil.h $(XDIR)\xlcurve.h
  87. $(DIR)\xldiag.obj:        $(NAME).h
  88.  
  89. ##### Clean Directory #####
  90. clean:
  91.     -del errors
  92.     -del *.obj
  93.     -del $(DIR)\*.obj
  94.     -del $(DIR)\*.res
  95.     -del $(DIR)\*.xll
  96.     -del *.map
  97.     -del *.@*
  98.     -del *.bak
  99.     
  100.